package com.ruoyi.web.controller.system;

import io.lettuce.core.ScriptOutputType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.utils.StringUtils;

/**
 * 首页
 *
 * @author ruoyi
 */
@RestController
public class SysIndexController
{
    /** 系统基础配置 */
    @Autowired
    private RuoYiConfig ruoyiConfig;

    /**
     * 访问首页，提示语
     */
    @RequestMapping("/")
    public String index() {
        System.out.println("AAA");
        return "<!DOCTYPE html>" +
                "<html>" +
                "<head>" +
                "    <title>后台管理系统</title>" +
                "</head>" +
                "<body>" +
                "    <h1>欢迎使用" + ruoyiConfig.getName() + "后台管理框架</h1>" +
                "    <p>当前版本：v" + ruoyiConfig.getVersion() + "</p>" +
                "    <p>请扫描下方二维码访问前端：</p>" +
                "    <img src='https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://your-frontend-url.com' alt='QR Code'/>" +
                "</body>" +
                "</html>";
    }
}
